package LineCode.Recruit2017.滴滴出行;

import java.util.Scanner;

/**
 * 输入一个正整数n,求n!(即阶乘)末尾有多少个0？
 * 比如: n = 10; n! = 3628800,所以答案为2
 */
public class 末尾0的个数 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int result = 0;
            while (n != 0) {
                result += n / 5;
                n /= 5;
            }
            System.out.println(result);
        }
    }
}
